package com.city.repository.report;

import com.city.domain.report.CtBuild;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 李顺时
 * @Description:
 * @Date: Create in 15:07 2018/9/7
 * @Modified By:
 * */

@Repository
public interface CtBuildRepository extends JpaRepository<CtBuild, Integer> {


    @Query(value = "select * from ct_build where code = ?1", nativeQuery = true)
    CtBuild findBuildByCode(String code);

    @Query(value = "select * from ct_build where gatherer_name = ?1", nativeQuery = true)
    List<CtBuild> findAllByGathererName(String gathererName);
}
